This application is based on Patent Application No. 10-248281 filed on Sep. 2, 1998 in Japan, the content of which is incorporated hereinto by reference.
1. Field of the Invention
The present invention relates to an image formation apparatus and an image formation method, more specifically to an image formation apparatus and an image formation method for performing a translucent calculation in a short time when displaying a scene on a display screen in which a translucent object and a background object of the translucent object overlap in a virtual space.
2. Description of the Related Art
Recently, with the progress of image depiction technology in three-dimensional computer graphics, a variety of techniques are developed for depicting objects in a virtual space such as used in a three-dimensional game apparatus and the like. In this kind of technology, since formation of a translucent object is useful, there is known a translucent depiction technology as described, for example, in Japanese Patent Application Laying-open Nos. 10-187951(1998) (corresponding to U.S. patent application Ser. No. 09/142,658) and 8-185543(1996). The disclosure of U.S. patent application Ser. No. 09/142,658 is incorporated herein by reference. In the following, translucent depiction and a prior art translucent depiction technology will be described.
FIG. 1 is a diagram for explaining translucent depiction in a virtual space.
In the virtual space of FIG. 1, three objects exist which are represented as a polygon A600, a polygon B610 and a translucent polygon T620, respectively. Here, the object represented by the polygon T620 is a translucent object. The polygon A600 and the polygon B610 are present in a background of the translucent polygon T620. The scene in the virtual space is depicted on a two-dimensional screen 650. A pattern corresponding to the polygon A600 is a polygon A660 in the two dimensional pattern. A pattern corresponding to the polygon B610 is a polygon B670 in the two-dimensional pattern, and a pattern corresponding to the translucent polygon T620 is a translucent polygon T680 of the two-dimensional pattern. Since the translucent polygon T620 is translucent, when viewed from the screen 650 side, the polygon A600 and the polygon B610 present in the background can be seen through. Therefore, on the screen 650, the two-dimensional polygon A660 and the two-dimensional polygon B670 present in the background of the two-dimensional translucent polygon T680 are required to be depicted to be seen through. As described above, depiction of a polygon present in the background of a translucent polygon or the like or another object in a virtual space to be seen through is referred to as translucent depiction.
FIG. 2 is a diagram showing an example of a frame buffer (memory) 130 storing a depiction data depicted on the screen 650 of FIG. 1.
In FIG. 2, the depiction data corresponding to the two-dimensional polygon A660 is data 760 of the polygon A660, the depiction data corresponding to the two-dimensional polygon B670 is data 770 of the polygon B670, and the depiction data corresponding to the two-dimensional translucent polygon T680 is data 780 of the translucent polygon T680. The respective depiction data are stored in a unit of pixel 700, 710 or the like. In the data 780 of the translucent polygon T, there are a background polygon A reference part 720 which is necessary to be referred to for performing translucent depiction and a background polygon B reference part 730 which overlaps with the data of the polygon B670 present in the background and is necessary to be referred to for performing translucent depiction. For these overlapping parts, after pixel data in the data 760 of the polygon A660 is read, and calculation for translucent depiction is performed between the pixel data and a corresponding pixel data in the data 780 of the translucent polygon T680, and then it is necessary to write depiction data of the calculation result at the position of the above-described pixel. This is the same as for the data 770 of the polygon B670 and a background B reference part 730.
FIG. 3 is a diagram showing a construction example of a prior art image formation apparatus for performing translucent depiction.
In FIG. 3, as described in the following, a depiction part 100 shown by the dotted line for performing depiction processing has the frame buffer 130, a translucent calculation part 105, a controller 125, a pre-depiction processing part 101, a texture memory 120 and the like. The frame buffer 130 is a data holding circuit (storage device) for storing the depiction data, and is composed, for example, of a DRAM. The controller 125 performs switching or the like between read from the frame buffer 130 and write to the frame buffer 130. The depiction part 100 reads a depiction data (hereinafter referred to as xe2x80x9cbackground dataxe2x80x9d) 108 of background object necessary for translucent calculation from the frame buffer 130 through the controller 125 and outputs it to the translucent calculation part 105 for performing translucent calculation. The translucent calculation includes various color calculations necessary for translucent depiction. The pre-depiction processing part 101 inputs polygon data 102 of translucent object from the CPU part 140, and then performs pre-depiction processing including texture mapping, and outputs a pixel data 104 resulting from pre-depiction processing to the translucent calculation part 105. The translucent calculation part 105 executes translucent calculation on inputted background data 108 and pixel data 104, and writes the resulting depiction data 106 in the frame buffer 130 for each pixel through the controller 125. The CPU part 140 inputs as necessary an instruction of an operator (not shown) from an operation part 150, and outputs as necessary a sound data to a sound output part 160. The texture memory 120 connecting to the pre-depiction processing part 101 is a data holding circuit holding circuit storing data of the result of performing texture mapping on polygons and the like. Data of the frame buffer 130 is outputted to a picture output part 170 through the controller 125, and finally displayed on a screen of a display apparatus such as a CRT 180.
FIG. 4 shows an example of time chart schematically showing read of background data 108 in the translucent calculation part 105 of FIG. 3 from the frame buffer 130, translucent calculation, and write of depiction data 106 after calculation into the frame buffer 130.
As shown in FIG. 4, in the translucent calculation part 105 of the prior art image formation apparatus, read of background data Dn (R(Dn)) was performed, then translucent calculation (F(Dn)) was performed, and finally write of depiction data Dn* (W(Dn*)) was performed. That is, any of read of background data from the frame buffer 130, and write of depiction data to the frame buffer 130 is not performed continuously, but performed pixel by pixel. Therefore, an overhead due to switching occurs between read of background data and write of depiction data at each pixel. Read from the frame buffer 130 and write to the frame buffer 130 is high in efficiency when it is performed continuously, however, is low in efficiency when it is performed for each pixel. That is, a total processing time when performing for each pixel is longer than a total processing time when performing continuously. Therefore, the prior art image formation apparatus in which read from the frame buffer 130 and write to the frame buffer 130 are performed for each pixel required a longer processing time.
Further, a total T=TR+TF+TW of a time TR required for read of background data, a time TF required for translucent calculation, and a time TW required for write of depiction data for each pixel is required and it is repeated for each pixel. That is, in the prior art image formation apparatus, background data is read pixel by pixel from the frame buffer 130, translucent calculation is performed to the background data and pixel data of translucent object, and the calculation result is written pixel by pixel into the frame buffer 130. For this reason, at every time when depiction of translucent object is necessary, a cycle time T for read of background data, translucent calculation and write of depiction data is required, and a longer processing time is required. Further, when complicated calculations, for example, a plurality of interpolation calculations for blend and filter and the like are necessary for translucent calculation, the time TF required for translucent calculation becomes longer, which has a problem of requiring even longer processing time. Therefore, translucent calculation has been limited to a simple calculation not requiring a long processing time.
It is therefore an object of the present invention to provide an image formation apparatus and an image formation method for performing translucent calculation in a short time when displaying a scene on a display screen in which a translucent object and a background object of the translucent object overlap in a virtual space.
In a first aspect of the present invention, there is provided an image formation apparatus for displaying a scene on a display screen in which a translucent object and a background object of the translucent object overlap in a virtual space, comprising storage means for storing data of the background object, and translucent calculation means for continuously reading data of the background object stored in the storage means, performing translucent calculation between data of the background object and data of the translucent object overlapping the background object, and continuously writing data of the result of the translucent calculation to the storage means.
Here, the translucent calculation means can simultaneously perform read of the background object data and the translucent calculation, or the translucent calculation and write of data of the translucent calculation result.
The translucent calculation can be divided into a plurality of calculations, and the translucent calculation means can simultaneously perform the plurality of calculations.
In a second aspect of the present invention, there is provided an image formation method according to the present invention is an image formation method for displaying a scene on a display screen in which a translucent object and a background object of the translucent object overlap in a virtual space, comprising a storage step for storing data of the background object in storage means, a translucent calculation step for continuously reading data of the background object stored in the storage means, performing translucent calculation between data of the background object and data of the translucent object overlapping the background object, and continuously writing data of the result of the translucent calculation to the storage means.
Here, the translucent calculation step can simultaneously perform read of the background object data and the translucent calculation, or the translucent calculation and write of data of the translucent calculation result.
The translucent calculation can be divided into a plurality of calculations, and the translucent calculation step can simultaneously perform the plurality of calculations.
With the above construction, translucent calculation can be performed in a short time, when displaying a scene on a display screen in which a translucent object and a background object of the translucent object overlap in a virtual space.
The above and other objects, effects, features and advantages of the present invention will become more apparent from the following description of embodiments thereof taken in conjunction with the accompanying drawings.